package collection;

import java.util.ArrayList;
import java.util.List;

public class SubLisDemo {
    public static void main(String[] args) {
        List<Integer> aa=new ArrayList<>();
        for(int i=0;i<10;i++) {
            aa.add(i * 10);
        }
            System.out.println(aa);

            List<Integer>subList=aa.subList(3,8);
            System.out.println(subList);


            for(int i=0;i<subList.size();i++){
                subList.set(i,subList.get(i)*10);
            }
        System.out.println("subList:"+subList);
        System.out.println("List:"+aa);

      aa.set(3,1000);
        System.out.println("List:"+aa);
        System.out.println("subList:"+subList);

        aa.remove(0);
        System.out.println("List:"+aa);
        System.out.println("subList:"+subList);


    }
}
